$(function () {
    $.ajax({
        url:"/inboundManage/queryPurchaseById",
        type:"post",
        dataType:"json",
        success:function (r) {
            console.log(r);
            $("li>cite").eq(0).html(r.purchaseid);
            $("li>cite").eq(1).html(r.purchasetime);
            $("li>cite").eq(2).html(r.totalmoney);
            $("li>cite").eq(3).html(r.creatname);
            $("li>cite").eq(4).html(r.checkstatus);
            $("li>cite").eq(5).html(r.checkopinion);
            $("li>cite").eq(6).html(r.checkname);
            $("li>cite").eq(7).html(r.checktime);
        }
    })

    $.ajax({
        url:"/inboundStatics/getGoodsDetail",
        type:"post",
        datatype: "json",
        success:function (r) {
            console.log(r)
            var t = "";
            var i = 1;
            for (let j = 0; j < r.length; j++) {
                t += "<tr>\n" +
                    "          <td>"+(i++)+"</td>\n" +
                    "          <td >"+r[j].goodsbrand+"</td>\n" +
                    "          <td>"+r[j].goodstype+"</td>\n" +
                    "          <td>"+r[j].goodsmodel+"</td>\n" +
                    "          <td>"+r[j].firmname+"</td>\n" +
                    "          <td>"+r[j].gcount+"</td>\n" +
                    "          <td>"+r[j].productunit+"</td>\n" +
                    "          <td>"+r[j].price+"</td>\n" +
                    "          <td>"+r[j].totalprice+"</td>\n" +
                    "        </tr>";
            }
            $("tbody").html(t);
        }
    })
})

